Skip to content

Feat/web 308 improve search on documentation website related tasks#376

Open
niallobrien wants to merge 46 commits intomainfrom
feat/web-308-improve-search-on-documentation-website-related-tasks
Open

Feat/web 308 improve search on documentation website related tasks#376
niallobrien wants to merge 46 commits intomainfrom
feat/web-308-improve-search-on-documentation-website-related-tasks

Conversation

@niallobrien
Copy link
Copy Markdown
Collaborator

@niallobrien niallobrien commented Mar 31, 2026

Story

https://linear.app/cloudsmith/issue/WEB-308/improve-search-on-documentation-website-and-related-tasks

Description

This feature replaces the existing search feature with an Algolia-backed search implementation. This required changes to the existing Algolia docs index (Crawler config), the docs site and the website. See website PR.

I used the dev_DOCS index while building this feature, and used Algolia's duplicate feature to move the index records into Docs only after I had first tested my local instance of the website against the dev_DOCS index.
The Algolia index has already been updated and I've confirmed that these changes do not break the search results in production.

The frontend implementation was a little fiddly in places due to the design requirements and the tokens being used on the site (vs the DS). There is future work planned to align the docs site tokens with the product.
I brought the SearchDialog component over from the website codebase and adjusted accordingly. The main changes being the inline and compact variants, along with theming options, keyboard activation, http method badges (as on the current implementation in production) and alternative grouping/ranking compared to the website's implementation.

Regarding http method badges, the implementation is in place, but I don't see how I can get Algolia to crawl a preview link that's behind a Vercel auth check, so I used an agent to script a batch insert into the docs index based on the http methods from the Swagger docs. This allowed me to test this feature locally (see screenshot). Once this PR is merged, the updated Crawler config should get the http method names from the data attribute that I've added to the frontend.

As much as I'd have loved for the two sites to share a common search package implementation here, the search result ordering & grouping is quite different between the two, and is already quite verbose in places, but this could potentially be tackled in a future story, especially if maintenance due to deviation becomes an issue. Future work will also include a light and dark mode, so I tried to somewhat account for this in advance.

There's also numerous updates to the site on mobile.

Screenshots

image CleanShot 2026-04-07 at 09 57 32

Release plan

  • Merge website and docs changes.
  • Run the crawler for the Docs index.
  • Remove the dev_DOCS index, as it won't be needed. A duplicate of Docs can be easily made at any point in the future.

Checklist

  • I have completed a design review if necessary.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 31, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cloudsmith-docs Ready Ready Preview, Comment Apr 8, 2026 10:26am

Request Review

@niallobrien niallobrien marked this pull request as ready for review April 3, 2026 15:12
Copilot AI review requested due to automatic review settings April 3, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants